CC      = g++

INC1    = ./header
INCDIRS = -I${INC1}
CFLAGS  = ${INCDIRS}

# Specify the target file and the install directory
INSTALLDIR  = ../lib
OUTPUTFILE  = $(INSTALLDIR)/libMarkMaths.a
INTMDIR     = ./intermediate
SOURCES     = $(wildcard ./source/*.cpp) 


OBJECTS = $(patsubst ./source/%.cpp,$(INTMDIR)/%.o,$(SOURCES))

# all is the default rule
all	: $(OUTPUTFILE)

clean: 
	rm -f $(INTMDIR)/*.o ../$(OUTPUTFILE)

# remove the old tapestry library and remake the new one
$(OUTPUTFILE):	$(OBJECTS)
	rm -f $@
	ar cq $@ $(OBJECTS)

$(OBJECTS): $(INTMDIR)/%.o : ./source/%.cpp
	$(CC) ${INCDIRS} -c -O3 $< $(CLIBS)-o $@

#markMaths.o: ./source/markMaths.cpp ./header/markMaths.h
#	$(CC) ${INCDIRS} -c ./source/markMaths.cpp



